package ooday02;

public class ExtendsTest {
    public static void main(String[] args) {
        Student student=new Student();
        student.name="Lrx";
        student.age=21;
        student.address="北京";
        student.className="jsd2407";
        student.stuId="001";
        student.study();
        student.eat();
        student.sleep();
        student.sayHi();
        System.out.println();

        Student stu=new Student("Lrx",21,"北京","jsd2407","001");
        stu.study();
        stu.eat();
        stu.sleep();
        stu.sayHi();
        System.out.println();

        Teacher teacher=new Teacher("Lrx",21,"北京","1000");
        teacher.eat();
        teacher.sleep();
        teacher.teach();
        teacher.sayHi();
        System.out.println();


        Doctor doctor=new Doctor("Lrx",21,"北京","医生");
        doctor.eat();
        doctor.sleep();
        doctor.cut();
        doctor.sayHi();
        System.out.println();


        Person person=new Person("lrx",21,"北京");
        person.eat();
        person.sleep();
        person.sayHi();
    }
}
